package net.cyndeline.GameMap

/**
 * Specifies behavior for any two-dimensional grid that partitions map space
 * into defined areas.
 */
trait Grid {
  def width: Int
  def height: Int
  def build(width: Int, height: Int)
  def add(node: Tile): Unit
  def remove(node: Tile): Unit
  def get(x: Int, y: Int): Option[Tile]
  def getNeighbors(x: Int, y: Int): List[Tile]
  def getNeighborPositions(x: Int, y: Int): List[(Int, Int)]
  def copy: Grid
}